package string;
/**String和StringBuilder的对比*/
public class StringStringBuilderDemo {
    public static void main(String[] args) {
        //String不适合频繁修改内容（效率低）
        String str = "a";
        StringBuilder builder  = new StringBuilder(str);
        for (int i = 0; i < 1000000; i++) {
            builder.append(i);
        }
        System.out.println("执行完毕");
    }
}
